const week = ['周日', '周一', '周二', '周三', '周四', '周五', '周六']
const d = new Date()
 let ch = d.getHours()
 let cm = d.getMinutes()
 let drtH = ch, drtM = cm
 const now = d.getDay()
 let tomorrow = now + 1
 if(tomorrow > 6) {
   tomorrow = 0
 }
 ch = ch < 9? '0' + ch : ch
 cm = cm < 9? '0' + cm : cm

 let total = (cm - 0) + 20
 if( total >= 60) {
   drtH ++
   total = total - 60
 }
 drtH = drtH < 9? '0' + drtH : drtH
 drtM = total < 9? '0'+ total : total
function getData(type) {
 const arr = []
 let h, m = 0, H = 0, M = 0
 const date = d.toLocaleString().split(' ')[0].split('/').join('-')
 if(type === 1) {
   arr.push({
     delivery_fee_description: "18元配送费",
     delivery_time: "",
     promotion_tips: "",
     time: ch + ':' + cm,
   })
   h = ch - 0
   if((cm - 0) >= 0 && (cm - 0) <15) {
     m = 0
   }else if((cm - 0) >= 15 && (cm - 0) <30) {
     m = 15
   }else if((cm - 0) >= 30 && (cm - 0) <45) {
     m = 30
   }else if((cm - 0) >= 45 && (cm - 0) <=59) {
     m = 45
   }
   for(let i = h; i <= 24; i++) {
     if(H === 23&& M == 45) {
       continue
     }
     m = m + 15
     if(m === 60){
       m = 0
       h++
       i++
     }
     i = h
     H = h<9? '0'+h : h
     M = m<9? '0'+m : m,
      arr.push({
        delivery_fee_description: "18元配送费",
        delivery_time: H + ':' + M,
        promotion_tips: "",
        time: H + ':' + M
      })
   }
 }else if(type === 2) {
   h = -1
   for(let i = 0; i < 68; i++) {
     m = 15*(i%4)
     if(m === 0) {
       h +=1
     }
     H = h<9? '0'+h : h
     M = m<9? '0'+m : m
     arr.push({
       delivery_fee_description: "18元配送费",
       delivery_time: date + ' ' + H + ':' + M,
       promotion_tips: "",
       time: H + ':' + M,
     })
     if(h === 4) {
       h = 10
       i-=3
     }
   }
 }
 return arr
}

const time_points1 = getData(1)
const time_points2 = getData(2)
const bizExtra = '{"activityUserTag":"","crmPromotion":false,"strategyType":-1}'

export default {
  account_address_count: 3,
  announcement: '为减少接触，降低风险，请修改下方备注',
  app_abandoned_info: {
    description: '',
    is_abandoned: false,
    scheme: 'eleme://web?'
  },
  book_hongbao_promotion_tips: '',
  business_type: 0,
  cart: {
    abandoned_extra: [
      {
        bizExtra,
        category_id: 11,
        description: '本单折扣商品超出1份以原价计算',
        icon: {
          color: '#faa43c',
          name: '特价'
        },
        id: 23650714157,
        level: 0,
        max_quantity: 1,
        name: '单品特价',
        original_price: 0,
        price: 0,
        quantity: 1,
        sale_total_weight: 0,
        type: 4
      },
      {
        bizExtra,
        category_id: 11,
        description: '本单折扣商品超出1份以原价计算',
        icon: {
          color: '#ffb359',
          name: '特价'
        },
        id: 23672548877,
        level: 0,
        max_quantity: 1,
        name: '单品特价',
        original_price: 0,
        price: 0,
        quantity: 1,
        sale_total_weight: 0,
        type: 4
      },
      {
        bizExtra,
        category_id: 12,
        description: '商品折扣与满减优惠不同享',
        icon: {
          color: '#f07373',
          image_hash: '',
          name: '满减'
        },
        id: 23672564061,
        level: 120,
        max_quantity: 1,
        name: '店铺满减',
        original_price: 0,
        price: 0,
        quantity: 1,
        sale_total_weight: 0,
        type: 102
      }
    ],
    activityMutexDescList: [
      {
        activityId: 23672564061,
        description: '商品折扣与满减优惠不同享',
        foodIds: [],
        id: 20,
        needAvailable: false,
        priority: 20,
        repeatTimes: 1,
        oastOpportunities: [1]
      },
      {
        activityId: 23650714157,
        description: '本单折扣商品超出1份以原价计算',
        foodIds: [2000000080915144],
        id: 24,
        needAvailable: false,
        priority: 24,
        repeatTimes: 1,
        oastOpportunities: [1]
      },
      {
        activityId: 23672548877,
        description: '本单折扣商品超出1份以原价计算',
        foodIds: [2000000080905227],
        id: 24,
        needAvailable: false,
        priority: 24,
        repeatTimes: 1,
        oastOpportunities: [1]
      }
    ],
    bottom_tip: '',
    category: 1,
    conditional_extra: [],
    deliver_amount: 168.4,
    deliver_time: '',
    delivery_tip: {color: 999, content: '', scheme: ''},
    discount_amount: -23,
    discount_amount_sum: -23,
    extra: {
      agent_fee: {
        category_id: 2,
        description: '已减3元',
        id: -10,
        max_quantity: 1,
        name: '配送费',
        original_price: 18,
        price: 15,
        quantity: 1,
        sale_total_weight: 0,
        type: 0
      },
      others: [],
      packing_fee: {
        category_id: 102,
        description: '',
        id: -70000,
        max_quantity: 1,
        name: '包装费',
        original_price: 6,
        price: 6,
        quantity: 1,
        sale_total_weight: 0,
        type: 0
      }
    },
    group: [
      [
        {
          act_tags: [],
          activities: [],
          attrs: [{name: "温度", value: "冷藏"}],
          beyond_time_peroid: 0,
          category_id: 1,
          discount_amount: 0,
          food_type: 0,
          garnish: [],
          group_id: 1238946686,
          id: 2000000080915144,
          image_hash: "a69e40d0d9db8c8ae222b7774f810543jpeg",
          is_selected: true,
          is_sold_out: 0,
          is_understock: 0,
          is_valid: 1,
          min_purchase_quantity: 1,
          name: "盐焗鸡心-原味",
          new_specs: [{name: "规格", value: "原味"}],
          price: 17.8,
          quantity: 1,
          quantity_changed: false,
          sale_total_weight: 0,
          sale_unit: "",
          scheme: "eleme://catering?target_food_id=2000000080915144&restaurant_id=E1322774006663486814&category_id=1238946686",
          sku_id: "300000082866888702",
          specs: ["原味"],
          stock: 9982,
          total_discount_amount: 0,
          total_price: 17.8,
          weight: 1,
          weight_flag: 2
        },
        {
          act_tags: [],
          activities: [],
          attrs: [],
          beyond_time_peroid: 0,
          category_id: 1,
          discount_amount: 0,
          food_type: 0,
          garnish: [],
          group_id: 1238966205,
          id: 2000000080905227,
          image_hash: "a633b1c86f23b25a713fab97264a5c51jpeg",
          is_selected: true,
          is_sold_out: 0,
          is_understock: 0,
          is_valid: 1,
          min_purchase_quantity: 1,
          name: "现烤窑鸡（半只）-原味",
          new_specs: [{name: "规格", value: "原味"}],
          price: 55.8,
          quantity: 1,
          quantity_changed: false,
          sale_total_weight: 0,
          sale_unit: "",
          scheme: "eleme://catering?target_food_id=2000000080905227&restaurant_id=E1322774006663486814&category_id=1238966205",
          sku_id: "300000082856915966",
          specs: ["原味"],
          stock: 9992,
          total_discount_amount: 0,
          total_price: 55.8,
          weight: 1,
          weight_flag: 2
        },
        {
          act_tags: [],
          activities: [],
          attrs: [],
          beyond_time_peroid: 0,
          category_id: 1,
          discount_amount: -23,
          food_type: 0,
          garnish: [],
          group_id: 1238966205,
          id: 2000000080929002,
          image_hash: "3265fdefea2e08bdcfe4319caaaae05fjpeg",
          is_selected: true,
          is_sold_out: 0,
          is_understock: 0,
          is_valid: 1,
          min_purchase_quantity: 1,
          name: "现烤窑鸡（整只）-原味",
          new_specs: [{name: "规格", value: "原味"}],
          price: 88.8,
          quantity: 1,
          quantity_changed: false,
          sale_total_weight: 0,
          sale_unit: "",
          scheme: "eleme://catering?target_food_id=2000000080929002&restaurant_id=E1322774006663486814&category_id=1238966205",
          sku_id: "300000082874895358",
          specs: ["原味"],
          stock: 9995,
          total_discount_amount: -23,
          total_price: 88.8,
          weight: 1,
          weight_flag: 2
        }
      ]
    ],
    id: "3be5b022afb64fd6b11353adf974972e",
    ingredient_group: [],
    is_address_too_far: 0,
    is_pintuan: 0,
    minimum_order_amount: 0,
    newUserStatus: 1,
    ontime_description_scheme: "eleme://web?url=https%3A//h5.ele.me/service/%23ontime",
    ontime_logo: "b3dea805fa0b4b6eb4f93c82d6266073png",
    ontime_promotion_text: "超时10分钟享赔付",
    ontime_status: 1,
    ontime_unavailable_reason: "当前特殊情况暂不享受超时赔付",
    original_total: 183.4,
    package_group: [],
    pick_up_time: "",
    pindan: {
      is_pindan: 0,
      lock: 0,
      num: 0,
      order_id: 0,
      order_token: "",
      owners: [],
      share_pindan: {
        description: "我要点【窑鸡王(新添寨店)】的外卖，有一起点的么？",
        image_path: "http://cube.elemecdn.com/7/b3/64936d56f2f4a08e0f467856aca4bjpeg.jpeg?w=86&h=86",
        title: "有人一起点外卖么？",
        url: "https://h5.ele.me/spell/?cartId=3be5b022afb64fd6b11353adf974972e&sig=85e6d25e127e597cd9acd9d9f1cde6f2&restaurant_id=E1322774006663486814"
      },
      unique_id: "0"
    },
    restaurant: {
      address: "贵州省贵阳市乌当区新添大道北段164号附7号天馨家园1幢2单元1层商场12号",
      airShopTag: 0,
      closing_remain_seconds: 0,
      id: "E1322774006663486814",
      image_path: "7b364936d56f2f4a08e0f467856aca4bjpeg",
      is_closed: 0,
      is_fengniao: 0,
      latitude: 26.632905,
      longitude: 106.776257,
      name: "窑鸡王(新添寨店)",
      next_business_time: "",
      onlyTakeInShop: false,
      only_use_poi: 0,
      phone: "",
      piecewise_agent_fee: {rules: [{fee: 18, price: 0}]},
      receivingMode: 1,
      scheme: "eleme://catering?restaurant_id=E1322774006663486814",
      status: 1,
      take_by_self: 1,
      type: 0
    },
    serviceFeeInfo: {
      baseExtraDeliveryFee: 0,
      distanceFee: 0,
      lpdExtraFee: 0,
      nightServiceFee: 0,
      weatherFee: 0,
      weightFee: 0
    },
    service_fee_explanation: "",
    sig: "85e6d25e127e597cd9acd9d9f1cde6f2",
    total: 160.4,
    total_sum: 160.4,
    tying_groups: [],
    tying_sku_group: [],
    tying_sku_total: 0
  },
  deliver_times: [
    {
      tab: "今日（"+week[now]+"）",
      time_points: time_points1
    },
    {
      tab: "明日（"+week[tomorrow]+"）",
      time_points: time_points2
    }
  ],
  deliver_times_extra: {use_new_api: false},
  deliveryExtra: {deliveryProductId: 47},
  delivery_reach_time: drtH + ':' + drtM,
  entrances: [],
  gift_option: {giver_phone: {description: "选填，便于商家及时沟通", is_required: false}, is_available: 0},
  hongpon_info: {
    amount: 0,
    available_count: 0,
    bankCouponAvailableCount: 0,
    bestPromotionStatus: 1,
    disabled: false,
    hongbao_sn: "",
    hongpon_entities: [],
    is_downgrade: 0,
    maxDiscountTag: false,
    merchant_coupon_id: 0,
    receive_tip: {is_valid: 0},
    recommends: [],
    recommendsTotalPrice: 0,
    scheme: "https://tb.ele.me/wow/zele/act/selecthongbao2?cartid=3be5b022afb64fd6b11353adf974972e&sig=85e6d25e127e597cd9acd9d9f1cde6f2&snList=%5B%5D&restaurant_id=E1322774006663486814",
    show_type: "normal",
    status: 0,
    status_text: "",
    svipInRecommend: false,
    title: "红包/抵用券",
    unavailable_count: 0
  },
  invoice: {einvoice_flag: 2, is_available: false, is_hidden: false, status_text: "该店不支持线上开票，请电话联系商户"},
  is_support_ninja: 1,
  merchant_promise: {is_active: 0},
  mifan_tip: "您的主食点了吗？",
  ninja_option: {is_auto_select: 0, is_support: 1},
  number_of_meals: {
    description: "便于商家带够餐具",
    environmental_slogan: "选无需餐具，用支付宝付款得16g能量",
    is_available: true,
    must_select_by_user: false,
    notice_cancel_disposable_tableware: true,
    reward: "3金币",
    slogan_tiny_icon: "8d7a7374cd66acef898c2584ff64b0eepng"
  },
  order_note_option: {entrance_description: "点击可选择无接触配送", hint: "无接触配送，辛苦将商品挂门把手上、放前台桌上或者指定地点", is_support: 1},
  entrance_description: "点击可选择无接触配送",
  hint: "无接触配送，辛苦将商品挂门把手上、放前台桌上或者指定地点",
  is_support: 1,
  pay_methods: [{disable_reason: "", id: 1, is_online_payment: true, name: "在线支付", promotion: [], select_state: 1}],
  pay_methods_v2: [],
  phone: "",
  shop_distance_desc: "距你4.7km",
  svip_mission_cell: {is_available: 0},
  svip_subscribe_remind: {is_available: 0},
  toast: "",
  tying_bottom_bar: {
    content: [{color: "FFFFFF", font_size: 12, text: "成为会员，本单立减5元"}],
    icon_hash: "a1b48864fe002365f22496ed2806c7depng",
    is_available: true,
    product_type: "supervip",
    tip: "成为会员，本单立减5元"
  },
  tying_products: [],
  tying_products_v2: [
    {
      assetDesc: '{"cancelPop":{"imageHash":null,"buttonText":null,"title":{"content":"现在放弃开卡?","highlight":null,"color":null,"imagHash":null},"subTitle":{"content":"仅需6元,即享20元红包","highlight":null,"color":null,"imagHash":null},"content":null,"confirmText":"放弃","confirmButton":null,"detainText":"再考虑下","detainButton":null},"confirmPop":{"imageHash":null,"buttonText":null,"title":{"content":"5元红包已到账，可去红包栏查看并使用","highlight":null,"color":null,"imagHash":null},"subTitle":{"content":null,"highlight":null,"color":null,"imagHash":null},"content":null,"confirmText":null,"confirmButton":null,"detainText":null,"detainButton":null},"subscribePop":null,"tyingPatternDesc":{"header":{"content":"开通享20元红包，本单可减5元","highlight":"可减5元","color":null,"imagHash":null},"notOptimalHeader":{"content":null,"highlight":null,"color":null,"imagHash":null},"body":{"content":"31天内可领4张5元红包,本单可用1张","highlight":null,"color":"gray","imagHash":null},"notOptimalBody":{"content":null,"highlight":null,"color":null,"imagHash":null},"headerImag":"https://gw.alicdn.com/imgextra/i2/19999999999999/O1CN01tUUuap2NjasoYErnk_!!19999999999999-2-tps.png","headerImageText":{"content":"官方推荐","highlight":null,"color":null,"imagHash":null},"bubble":{"text":"新会员特惠","textColor":"634426","backgroud":"F2D499"},"tipUrl":"https://h5.ele.me/service/#supervipcardrulesnew","liftGuide":{"content":"开通超级吃货卡，本单立减5元","highlight":"立减5元","color":null,"imagHash":null},"hbAssertList":[{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":"本单可用","effect":null,"currentOrder":true,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false}],"scene":1,"richHeader":null,"descriptionList":null}}',
      bottom_bar: {
        content: [{color: "FFFFFF", font_size: 12, text: "成为会员，本单立减5元"}],
        icon_hash: "a1b48864fe002365f22496ed2806c7depng",
        is_available: true,
        product_type: "supervip",
        tip: "成为会员，本单立减5元"
      },
      category_id: 71,
      discount_description: [{highlight: "4个5元", text: "31天内可领4张5元无门槛红包"}],
      discount_description_v2: [[{color: "999999", image_hash: "", text: "31天内可领4张5元无门槛红包"}]],
      discount_total: 5,
      exchange_bonus: 0,
      extraData: {
        svipAssetDesc: '{"cancelPop":{"imageHash":null,"buttonText":null,"title":{"content":"现在放弃开卡?","highlight":null,"color":null,"imagHash":null},"subTitle":{"content":"仅需6元,即享20元红包","highlight":null,"color":null,"imagHash":null},"content":null,"confirmText":"放弃","confirmButton":null,"detainText":"再考虑下","detainButton":null},"confirmPop":{"imageHash":null,"buttonText":null,"title":{"content":"5元红包已到账，可去红包栏查看并使用","highlight":null,"color":null,"imagHash":null},"subTitle":{"content":null,"highlight":null,"color":null,"imagHash":null},"content":null,"confirmText":null,"confirmButton":null,"detainText":null,"detainButton":null},"subscribePop":null,"tyingPatternDesc":{"header":{"content":"开通享20元红包，本单可减5元","highlight":"可减5元","color":null,"imagHash":null},"notOptimalHeader":{"content":null,"highlight":null,"color":null,"imagHash":null},"body":{"content":"31天内可领4张5元红包,本单可用1张","highlight":null,"color":"gray","imagHash":null},"notOptimalBody":{"content":null,"highlight":null,"color":null,"imagHash":null},"headerImag":"https://gw.alicdn.com/imgextra/i2/19999999999999/O1CN01tUUuap2NjasoYErnk_!!19999999999999-2-tps.png","headerImageText":{"content":"官方推荐","highlight":null,"color":null,"imagHash":null},"bubble":{"text":"新会员特惠","textColor":"634426","backgroud":"F2D499"},"tipUrl":"https://h5.ele.me/service/#supervipcardrulesnew","liftGuide":{"content":"开通超级吃货卡，本单立减5元","highlight":"立减5元","color":null,"imagHash":null},"hbAssertList":[{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":"本单可用","effect":null,"currentOrder":true,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false},{"amount":"5","threshold":"0","effectiveDays":"31","name":null,"content":null,"effect":null,"currentOrder":false,"raise":false}],"scene":1,"richHeader":null,"descriptionList":null}}'
      },
      icon_hash: "c7aa84b6241f335792edd15457b389cdpng",
      id: 701,
      is_new_svip_user: true,
      is_show: true,
      logo: "",
      marketing_icon: "0cb38b4623beb4525bcfb99494bbec9apng",
      name: "现在开通，本单立减5元",
      original_price: 15,
      pop_up: {
        button_text: "去加购",
        context_image_hash: "4da1e59e8c5060a30817544d8c359e0epng",
        context_text: "",
        is_available: false,
        popup_type: 0,
      },
      price: 6,
      price_tip_icon: {backgroud: "F2D499", text: "新会员特惠", text_color: "634426"},
      quantity: 1,
      selected_description: [],
      sidebar_color: "D7C56F",
      tip_scheme: "https://h5.ele.me/service/#supervipcardrulesnew",
      tyingCellHeaderImageHash: "https://cube.elemecdn.com/a/e1/60d9cabc95e1f5db7c0631b96d534png.png"
    }
  ],
  tying_sku_products: [],
  tying_sku_rank_id: "c72c10b24a9b4f2a83f3568204a018f1",
  tying_supervip_extra: {tying_super_vip_display: true, tying_super_vip_price: 6, tying_super_vip_selected: false},
}
